package com.cdks.wuxiu.api.service.mysql;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cdks.wuxiu.api.component.constant.Constant;
import com.cdks.wuxiu.api.mapper.UserInviteInfoMapper;
import com.cdks.wuxiu.api.model.dto.UserInfoDTO;
import com.cdks.wuxiu.api.model.dto.InviteStatisDTO;
import com.cdks.wuxiu.entity.mysql.UserInviteInfo;

import java.util.List;

import org.springframework.stereotype.Service;


/**
 * 用户邀请信息 服务实现类
 */
@Service
public class UserInviteInfoServiceImpl extends ServiceImpl<UserInviteInfoMapper, UserInviteInfo> implements UserInviteInfoService {
    @Override
    public List<UserInfoDTO> getList(long userId, int page, int start, int stop) {
        return baseMapper.getList(userId, start, stop, page * Constant.LIST_PAGE_SIZE, Constant.LIST_PAGE_SIZE);
    }

    @Override
    public InviteStatisDTO getStatisByUser(long userId) {
        return baseMapper.getStatis(userId);
    }    
}
